DOMHelper.prototype = new JQueryWrapper
DOMHelper.prototype.constructor = DOMHelper

function DOMHelper() {
	this.getSeparator = function(separator) {
		if(separator == null) {
			separator = "<br />";
		}
		return separator;
	};
}

DOMHelper.prototype.getHTMLContent = function(elementId) {
	return jQuery(this.buildJQueryIdSelector(elementId)).html();
};

DOMHelper.prototype.setHTMLContent = function(elementId, newHtml) {
	jQuery(this.buildJQueryIdSelector(elementId)).html(newHtml);
};

DOMHelper.prototype.appendHTMLContent = function(elementId, newHtml, separator) {
	var oldHtml = this.getHTMLContent(elementId);
	this.setHTMLContent(elementId, oldHtml + this.getSeparator(separator) + newHtml);
};

DOMHelper.prototype.addChildDiv = function(parentDivId, childDivId, childCssClass) {
	var childDiv = jQuery("<div id='" + childDivId + "' class='" + childCssClass + "'></div>");
	jQuery(this.buildJQueryIdSelector(parentDivId)).append(childDiv);
};

DOMHelper.prototype.addChildAnchor = function(parentId, childAnchorId, href, label) {
	var anchor = jQuery("<a id='" + childAnchorId + "' href='" + href + "'>" + label + "</a>");
	jQuery(this.buildJQueryIdSelector(parentId)).append(anchor);
};

DOMHelper.prototype.addChildIFrame = function(parentDivId, childIFrameId, childIFrameSrc) {
	var iframe = jQuery("<iframe id='" + childIFrameId + "' src='" + childIFrameSrc + "' height='100%' width='100%'></iframe>");
	jQuery(this.buildJQueryIdSelector(parentDivId)).append(iframe);
};